<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
<title>SyncURL method</title>
<style>@import url(coUA.css);</style>
<link disabled rel="stylesheet" href="htmlhelp.css">
</HEAD>

<BODY>
<h1>SyncURL method</h1>

<h2>Purpose</h2>

<p>Use the <b>SyncURL</b> method to select the contents (.hhc) file entry for a topic that you specify.</p>

<!--answer for next release<p><font face="Arial" color="Red">Query: <b>Pending tech review:</b> So, how does this compare to or work with auto synch? Can this be used if auto synch is turned on -- or is it duplication of functionality? Are there cases where this <i>should</i> be used instead of auto synch?</font></p>-->

<p>The instance of the HTML Help ActiveX control that you reference when using the <b>SyncURL</b> method must specify the <a href="ocx_contents.htm">Contents</a> command.</p>

<p>This command can be used only with a compiled help (.chm) file.</p>

<h2>Applies to</h2>
<p><a href=ocx_contents.htm>Contents</a></p>

<h2>Syntax</h2>
<p><code>
SyncURL(BSTR <i>pszUrl</i>)
</code></p>

<br>
<table border=1 cellpadding=0 cellspacing=0 width=100%>
<tr valign=top>
<th>
<b>PARAM name</b>
</th>
<th>
<b>Values</b>
</th>
</tr>

<tr valign=top>
<td>
<i>pszUrl</i>
</td>
<td>
Specifies the topic whose corresponding contents entry you want to select.
</td>
</tr>
</table>

<h2>Example</h2>

<p>The following example shows how to use the <b>SyncURL</b> method to select entries in a contents (.hhc) file.</p>

<b>The code for the control:</b>
<pre><code>
&lt;OBJECT
<br>  id=sync
<br>  type="application/x-oleobject"
<br>  classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
<br>  codebase="hhctrl.ocx#Version=4,72,8252,0"
<br>  width=35%
<br>  height=25%
<br>&gt;
<br>  &lt;PARAM name="Command" value="Contents"&gt;
<br>  &lt;PARAM name="Item1" value="methods.hhc"&gt;
<br>  &lt;/OBJECT&gt;
</code></pre>


<p><b>The JavaScript code to invoke the control:</b></p>
<code>
&lt;a href=JavaScript:sync.syncURL('textpopup.htm')&gt;Go to textpopup.htm&lt;/a&gt;
</code>

<h2><a href="showme_syncurl.htm">Show Me</a></h2>

<h2>Comments</h2>
<ul>
<li>The <b>SyncURL</b> method provides the same functionality as clicking the <b>Locate</b> button on the HTML Help Viewer toolbar.</li>
</ul>

<br>
<table border="0" cellpadding="0" cellspacing="4">
<tr>
<td valign="top"><a href="ocx_methods.htm"><img src="proced.gif" alt="link to overview topic" border="0"></a>
</td>
<td><a href="ocx_methods.htm">About methods</A>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>

</BODY>
</HTML>
